<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="HandheldFriendly" content="True" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>{$title}</title>
    <meta name="keywords" content="{$keywords}" />
    <meta name="description" content="{$description}" />
    <link rel="shortcut icon" href="/favicon.ico">
    <link rel="stylesheet" href="__STATIC__/addons/cms/template/normal/static/css/bootstrap.min.css">
    <link rel="stylesheet" href="__STATIC__/addons/cms/template/normal/static/css/style.css" />
    <link rel="stylesheet" href="__STATIC__/addons/cms/template/normal/static/css/carousel.css" />
    <script src="__STATIC__/addons/cms/template/normal/static/js/jquery.min.js"></script>
    <script src="__STATIC__/addons/cms/template/normal/static/js/bootstrap.min.js"></script>
    <style>
        .keylist tbody tr:hover {
            background-color: #FBEED8;
        }
    </style>
</head>
<body>
    {include file="normal/z-head"}
    <style>
        .seo-zhenduan input[type="text"] {
            margin: 10px 0px;
        }
        .search-input {
            border-radius: 0px;
        }
        .btn-search {
            border-radius: 4px;
            border-left: 0px;
        }
    </style>
    <div class="container search">
        <div class="row">
            <div class="col-lg-4"></div>
            <div class="col-lg-4">
                <form action="{:url('Form/dopost')}" enctype="multipart/form-data" method="post">
                    <h3>{$title}</h3>
                    <div class="input-group seo-zhenduan">
                        {if condition="$fields"}
                        {volist name="$fields" id="field"}
                        {if condition="($field['is_show'] == 1 || $field['is_show'] == 2) AND $field['status'] ==1"}
                            {switch name="field.type"}
                                {case value="num"}<!-- 数字 -->
                                    <input type="text" class="form-control" name="{$field.name}" value="{$field.value}" placeholder="{$field['title']}">
                                {/case}
                                {case value="string"}<!-- 字符串 -->
                                    <input type="text" class="form-control" name="{$field.name}" value="{$field.value}" placeholder="{$field['title']}">
                                {/case}
                                {case value="textarea"}<!-- 文本域 -->
                                    <textarea class="form-control" name="{$field.name}" placeholder="{$field['title']}">{$field.value}</textarea>
                                {/case}
                                {case value="radio"}<!-- 单选 -->
                                    {volist name=":parse_field_attr($field['extra'])" id="vo"}
                                    <label><input type="radio" name="{$field.name}" value="{$key}" {eq name="field.value" value="$key"}checked{/eq}>{$vo}</label>
                                    {/volist}<br>
                                {/case}
                                {case value="checkbox"}<!-- 多选 -->
                                    {volist name=":parse_field_attr($field['extra'])" id="vo"}
                                    <input type="checkbox" type="checkbox" value="{$key}" name="{$field.name}[]" {if in_array($key,explode(",",$field.value))} checked="checked" {/if} title="{$key}：{$vo}">{$vo}
                                    {/volist}<br>
                                {/case}
                                {case value="select"}<!-- option下拉 -->
                                    <select name="{$field.name}" style="width: 462px;">
                                        <option value="" selected>请选择</option>
                                        {volist name=":parse_field_attr($field['extra'])" id="vo"}
                                        <option value="{$key}" {eq name="field.value" value="$key"}selected{/eq}>{$vo}</option>
                                        {/volist}
                                    </select><br>
                                {/case}
                                {default/}<!-- 默认 -->
                                    <input type="text" class="form-control" name="{$field.name}" value="{$field.value}" placeholder="{$field['title']}">
                            {/switch}
                        {/if}
                        {/volist}
                        {/if}
                        {if $formInfo.setting.isverify}
                        <div class="layui-form-item verify-box">
                            <div>
                                <img id="verify" src="{:captcha_src('index')}" title="点击刷新" alt="验证码">
                            </div>
                            <div>
                                <input type="text" name="verify" placeholder="验证码*" value="">
                                <!-- <img id="verify" src="{:url('api/checkcode/getVerify')}?font_size=18&imageW=130&imageH=38" title="点击刷新" alt="验证码"> -->
                            </div>
                        </div>
                        {/if}
                        {:token_field('__token__', 'md5')}
                        <input type="hidden" name="formname" value="{$formname}"/>
                        <button type="submit" class="btn btn-search">提交</button>
                    </div>
                </form>
            </div>
            <div class="col-lg-4"></div>
        </div>
    </div>
    <script type="text/javascript">
        // 刷新验证码
        $("#verify").click(function() {
            var verifyimg = $("#verify").attr("src");
            $("#verify").attr("src", verifyimg.replace(/\?.*$/, '') + '?' + Math.random());
        });
    </script>
    {include file="normal/z-footer"}
</body>
</html>